#a+b+c=1000,a,b,c为毕达哥拉斯数，求abc
for a in range(1,1001):
    for b in range(1,1001):
        c = 1000 - a - b
        if a*a == b*b + c*c:
            print(a,b,c,a*b*c)
